{include file="public/header" /}
<body>
<style>
    .cion{
        display: inline-block;
        width: 120px;
    }
</style>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
    <span class="c-gray en">&gt;</span> 资产管理
    <span class="c-gray en">&gt;</span> 换购记录
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="/money/recordToGoods" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<div class="page-container">
    <form  method="get" action="">
        <div class="text-c">
            <input type="text" class="input-text" style="width:250px" placeholder="用户账号" value="{:input('word')}" name="word">
            <span class="select-box" style="width: 100px;">
                <select name="type" class="select">
                    <option value="-1">全部类型</option>
                    <option value="1" {if isset($_GET['type']) && $_GET['type'] == 1}selected{/if}>合约收益</option>
                    <option value="2" {if isset($_GET['type']) && $_GET['type'] == 2}selected{/if}>奖金</option>
                </select>
            </span>
            <span class="select-box" style="width: 100px;">
                <select name="gid" class="select">
                    <option value="0">全部商品</option>
                    {foreach $goods as $v}
                        {if isset($_GET['gid']) && $v.id ==  $_GET['gid']}
                        <option value="{$v.id}" selected>{$v.name}</option>
                        {else/}
                        <option value="{$v.id}">{$v.name}</option>
                        {/if}
                    {/foreach}

                </select>
            </span>
            <button type="submit" class="btn btn-success">搜索</button>
        </div>
    </form>

    <div class="cl pd-5 bg-1 bk-gray mt-20">
        <span class="l">
        </span>
        <span class="r">共有数据：<strong>{$list->total()}</strong> 条</span> </div>
    <table class="table table-border table-bordered table-hover table-bg">
        <thead>
        <tr>
            <th scope="col" colspan="8">预定列表</th>
        </tr>
        <tr class="text-c">
            <th width="50">标识</th>
            <th width="100">换购人</th>
            <th width="120">换购商品</th>
            <th width="120">商品备注</th>
            <th width="80">类型</th>
            <th width="80">换购数量</th>
            <th width="100">换购时间</th>
            <th width="150">换购卖单</th>
        </tr>
        </thead>
        <tbody>
        {foreach $list as $v}
        <tr class="text-c">
            <td>{$v.id}</td>
            <td>用户标识{$v.uid}：账号{$v.user_name}</td>
            <td>{$v.id}:{$v.gname}</td>
            <td>{$v.gmark}</td>
            <td>{switch name="$v.type"}
                {case value="1"}合约收益{/case}
                {case value="2"}奖金{/case}
                 {default /}--
                {/switch}
            </td>
            <td>{$v.num}</td>
            <td>{$v.time}</td>
            <td>订单id{$v.sell_id}:订单号{$v.sell_sn}</td>
        </tr>
        {/foreach}
        </tbody>
    </table>
    <div class="page">
        {$list->render()|raw}
    </div>
</div>

{include file="public/footer" /}

<script type="text/javascript">


</script>